﻿using System.Collections.Generic;

namespace NMA.Infrastructure.NHibernate.DomainObject
{
    using NMA.Domain.Shared;
    using NMA.Infrastructure.DBC;
    using NMA.Domain.Model;

    public class User : BaseEntity<IUser>, IUser
    {
        public virtual string UserName { get; set; }

        public virtual string Password { get; set; }

        public virtual bool IsAlive { get; set; }

        public virtual string Description { get; set; }

        public virtual Address Address { get; set; }

        public virtual int BelongToRole { get; set; }

        public override bool SameIdentityAs(IUser other)
        {
            Check.Assert(other == null, "User is null");

            return other.Id == this.Id;
        }        
    }
}